function showLog()
{
    document.getElementById('log').style.display = 'block';
    document.getElementById('toggleLog').setAttribute('onclick', 'hideLog();');
    document.getElementById('toggleLog').setAttribute('title', 'Hide log');
}
function hideLog()
{
    document.getElementById('log').style.display = 'none';
    document.getElementById('toggleLog').setAttribute('onclick', 'showLog();');
    document.getElementById('toggleLog').setAttribute('title', 'Show log');
}